package com.tboss.am.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.tboss.am.dao.ServerDao;
import com.tboss.am.dto.ServerDto;

@Service
public class ServerService {
	
	// @Autowired ServerDao serverDao;
	@Autowired private ServerDao serverDao;
	// @Autowired private CriticalDao criticalDao;	

	public List<ServerDto> selectAll(){
		return this.serverDao.selectAll();		
	}
	
	public ServerDto selectOne(int svrNum){
		return this.serverDao.selectOne(svrNum);
	}

	public void insert(ServerDto serverDto){	
		this.serverDao.insert(serverDto);
		// this.criticalDao.insert(serverDto);
	}
	
	public void update(ServerDto serverDto){
		this.serverDao.update(serverDto);
	}
	
	public void delete(int svrNum){
		this.serverDao.delete(svrNum);
	}
	
}
